const _ = require('lodash')

//模拟lodash的flowRight方法
function flowRight (...args){
    return function (value){
        let result = value
        args.reverse().forEach(function(fn,index){
            result = fn(result)
        })
        return result
    }
}

const f = flowRight(_.toUpper, _.first, _.reverse)

console.log( f(['one', 'two', 'three']) )